set more off

*****************************************************
*****************************************************
*****TOTAL EXPENDITURES******************************
*****************************************************
*****************************************************

*************************************************************************************************************************************************
*Date of Enactment as Treatment Date
*************************************************************************************************************************************************

use TermLimits-Synth.dta

tsset fips Year

*Arizona
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(4) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export ArizonaEDV1.ps

matrix A = e(W_weights)
matselrc A B, c(2)
local a=1
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local b=1
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(4 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(4 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(4 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(4 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(4 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(4 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(4 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(4 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(4 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(4 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(4 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(4 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Arkansas
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(5) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ArkansasEDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(5 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(5 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(5 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(5 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(5 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(5 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(5 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(5 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(5 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(5 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(5 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(5 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*California
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(6) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export CaliforniaEDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(1) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(9) counit(6 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(10) counit(6 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(13) counit(6 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(17) counit(6 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(18) counit(6 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(19) counit(6 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(20) counit(6 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(21) counit(6 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(24) counit(6 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(27) counit(6 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(28) counit(6 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(33) counit(6 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(34) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(35) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(36) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(37) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(38) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(42) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(44) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(45) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(47) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(48) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(50) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(51) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(54) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(55) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Colorado
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(8) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ColoradoEDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(1) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(9) counit(8 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(10) counit(8 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(13) counit(8 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(17) counit(8 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(18) counit(8 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(19) counit(8 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(20) counit(8 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(21) counit(8 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(24) counit(8 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(27) counit(8 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(28) counit(8 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(33) counit(8 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(34) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(35) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(36) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(37) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(38) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(42) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(44) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(45) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(47) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(48) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(50) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(51) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(54) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(55) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Florida
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(12) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export FloridaEDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(12 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(12 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(12 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(12 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(12 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(12 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(12 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(12 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(12 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(12 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(12 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(12 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Louisiana
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(22) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export LouisianaEDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(1) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(9) counit(22 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(10) counit(22 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(13) counit(22 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(17) counit(22 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(18) counit(22 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(19) counit(22 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(20) counit(22 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(21) counit(22 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(24) counit(22 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(27) counit(22 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(28) counit(22 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(33) counit(22 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(34) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(35) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(36) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(37) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(38) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(42) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(44) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(45) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(47) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(48) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(50) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(51) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(54) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(55) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Maine
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(23) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MaineEDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(1) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(9) counit(23 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(10) counit(23 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(13) counit(23 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(17) counit(23 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(18) counit(23 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(19) counit(23 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(20) counit(23 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(21) counit(23 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(24) counit(23 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(27) counit(23 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(28) counit(23 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(33) counit(23 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(34) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(35) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(36) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(37) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(38) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(42) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(44) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(45) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(47) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(48) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(50) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(51) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(54) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14), trperiod(16) trunit(55) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Michigan
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(26) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MichiganEDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(26 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(26 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(26 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(26 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(26 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(26 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(26 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(26 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(26 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(26 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(26 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(26 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Missouri
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(29) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MissouriEDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(29 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(29 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(29 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(29 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(29 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(29 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(29 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(29 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(29 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(29 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(29 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(29 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Montana
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(30) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MontanaEDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(30 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(30 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(30 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(30 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(30 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(30 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(30 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(30 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(30 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(30 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(30 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(30 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Nevada
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(32) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export NevadaEDV1.ps



matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(1) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(9) counit(32 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(10) counit(32 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(13) counit(32 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(17) counit(32 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(18) counit(32 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(19) counit(32 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(20) counit(32 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(21) counit(32 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(24) counit(32 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(27) counit(32 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(28) counit(32 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(33) counit(32 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(34) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(35) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(36) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(37) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(38) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(42) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(44) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(45) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(47) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(48) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(50) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(51) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(54) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17), trperiod(19) trunit(55) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Ohio
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(39) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OhioEDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(39 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(39 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(39 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(39 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(39 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(39 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(39 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(39 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(39 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(39 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(39 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(39 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Oklahoma
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(40) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OklahomaEDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(1) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(9) counit(40 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(10) counit(40 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(13) counit(40 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(17) counit(40 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(18) counit(40 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(19) counit(40 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(20) counit(40 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(21) counit(40 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(24) counit(40 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(27) counit(40 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(28) counit(40 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(33) counit(40 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(34) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(35) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(36) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(37) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(38) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(42) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(44) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(45) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(47) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(48) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(50) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(51) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(54) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11), trperiod(13) trunit(55) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*South Dakota
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(46) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export SouthDakotaEDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(46 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(46 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(46 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(46 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(46 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(46 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(46 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(46 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(46 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(46 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(46 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(46 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


save enactdv1.dta


*************************************************************************************************************************************************
*Date of Implementation as Treatment Date
*************************************************************************************************************************************************

clear
use TermLimitsRun.dta

*Arizona
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(4) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ArizonaIDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local a=1
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local b=1
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(4 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(4 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(4 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(4 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(4 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(4 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(4 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(4 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(4 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(4 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(4 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(4 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Arkansas
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(5) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ArkansasIDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(1) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(9) counit(5 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(10) counit(5 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(13) counit(5 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(17) counit(5 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(18) counit(5 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(19) counit(5 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(20) counit(5 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(21) counit(5 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(24) counit(5 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(27) counit(5 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(28) counit(5 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(33) counit(5 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(34) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(35) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(36) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(37) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(38) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(42) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(44) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(45) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(47) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(48) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(50) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(51) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(54) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19),  trperiod(21) trunit(55) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*California
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(6) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export CaliforniaIDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(1) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(9) counit(6 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(10) counit(6 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(13) counit(6 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(17) counit(6 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(18) counit(6 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(19) counit(6 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(20) counit(6 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(21) counit(6 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(24) counit(6 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(27) counit(6 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(28) counit(6 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(33) counit(6 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(34) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(35) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(36) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(37) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(38) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(42) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(44) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(45) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(47) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(48) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(50) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(51) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(54) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(55) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Colorado
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(8) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ColoradoIDV1.ps



matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(1) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(9) counit(8 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(10) counit(8 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(13) counit(8 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(17) counit(8 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(18) counit(8 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(19) counit(8 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(20) counit(8 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(21) counit(8 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(24) counit(8 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(27) counit(8 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(28) counit(8 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(33) counit(8 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(34) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(35) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(36) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(37) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(38) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(42) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(44) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(45) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(47) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(48) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(50) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(51) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(54) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(55) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Florida
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(12) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export FloridaIDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(12 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(12 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(12 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(12 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(12 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(12 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(12 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(12 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(12 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(12 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(12 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(12 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Maine
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(23) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MaineIDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(1) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(9) counit(23 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(10) counit(23 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(13) counit(23 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(17) counit(23 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(18) counit(23 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(19) counit(23 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(20) counit(23 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(21) counit(23 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(24) counit(23 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(27) counit(23 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(28) counit(23 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(33) counit(23 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(34) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(35) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(36) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(37) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(38) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(42) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(44) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(45) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(47) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(48) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(50) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(51) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(54) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16), trperiod(18) trunit(55) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Michigan
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(26) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MichiganIDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(1) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(9) counit(26 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(10) counit(26 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(13) counit(26 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(17) counit(26 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(18) counit(26 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(19) counit(26 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(20) counit(26 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(21) counit(26 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(24) counit(26 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(27) counit(26 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(28) counit(26 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(33) counit(26 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(34) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(35) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(36) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(37) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(38) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(42) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(44) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(45) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(47) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(48) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(50) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(51) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(54) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18),  trperiod(20) trunit(55) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Montana
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(30) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MontanaIDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(30 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(30 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(30 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(30 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(30 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(30 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(30 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(30 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(30 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(30 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(30 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(30 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Ohio
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(39) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OhioIDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(39 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(39 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(39 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(39 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(39 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(39 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(39 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(39 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(39 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(39 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(39 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(39 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*South Dakota
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(46) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export SouthDakotaIDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(46 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(46 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(46 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(46 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(46 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(46 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(46 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(46 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(46 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(46 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(46 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(46 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15) Total_Exp_Per_Capita(16) Total_Exp_Per_Capita(17) Total_Exp_Per_Capita(18) Total_Exp_Per_Capita(19) Total_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


save implemdv1.dta




*************************************************************************************************************************************************
*Repeal States
*************************************************************************************************************************************************

clear
use TermLimitsRun.dta

*Idaho
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(16) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export IdahoRDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local a=1
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local b=1
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(1) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(9) counit(16 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(10) counit(16 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(13) counit(16 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(17) counit(16 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(18) counit(16 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(19) counit(16 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(20) counit(16 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(21) counit(16 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(24) counit(16 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(27) counit(16 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(28) counit(16 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(33) counit(16 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(34) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(35) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(36) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(37) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(38) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(42) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(44) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(45) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(47) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(48) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(50) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(51) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(54) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(55) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Massachusetts
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(25) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export MassachusettsRDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(1) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(9) counit(25 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(10) counit(25 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(13) counit(25 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(17) counit(25 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(18) counit(25 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(19) counit(25 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(20) counit(25 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(21) counit(25 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(24) counit(25 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(27) counit(25 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(28) counit(25 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(33) counit(25 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(34) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(35) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(36) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(37) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(38) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(42) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(44) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(45) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(47) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(48) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(50) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(51) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(54) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(55) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Oregon
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(41) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OregonRDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(41 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(41 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(41 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(41 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(41 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(41 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(41 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(41 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(41 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(41 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(41 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(41 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Utah
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(49) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export UtahRDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(1) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(9) counit(49 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(10) counit(49 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(13) counit(49 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(17) counit(49 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(18) counit(49 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(19) counit(49 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(20) counit(49 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(21) counit(49 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(24) counit(49 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(27) counit(49 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(28) counit(49 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(33) counit(49 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(34) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(35) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(36) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(37) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(38) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(42) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(44) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(45) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(47) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(48) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(50) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(51) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(54) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13) Total_Exp_Per_Capita(14) Total_Exp_Per_Capita(15),  trperiod(17) trunit(55) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Washington
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(53) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export WashingtonRDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(53 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(53 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(53 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(53 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(53 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(53 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(53 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(53 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(53 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(53 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(53 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(53 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Wyoming
qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(56) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export WyomingRDV1.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(56 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(56 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(56 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(56 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(56 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(56 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(56 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(56 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(56 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(56 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(56 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(56 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Total_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Total_Exp_Per_Capita(1) Total_Exp_Per_Capita(2) Total_Exp_Per_Capita(3) Total_Exp_Per_Capita(4) Total_Exp_Per_Capita(5) Total_Exp_Per_Capita(6) Total_Exp_Per_Capita(7) Total_Exp_Per_Capita(8) Total_Exp_Per_Capita(9) Total_Exp_Per_Capita(10) Total_Exp_Per_Capita(11) Total_Exp_Per_Capita(12) Total_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

save repealdv1.dta

*****************************************************
*****************************************************
*****EDUCATION EXPENDITURES******************************
*****************************************************
*****************************************************

*************************************************************************************************************************************************
*Date of Enactment as Treatment Date
*************************************************************************************************************************************************

clear
use TermLimitsRun.dta


*Arizona
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(4) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export ArizonaEDV2.ps

matrix A = e(W_weights)
matselrc A B, c(2)
local a=1
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local b=1
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(4 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(4 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(4 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(4 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(4 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(4 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(4 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(4 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(4 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(4 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(4 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(4 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Arkansas
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(5) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ArkansasEDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(5 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(5 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(5 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(5 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(5 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(5 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(5 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(5 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(5 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(5 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(5 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(5 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*California
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(6) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export CaliforniaEDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(1) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(9) counit(6 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(10) counit(6 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(13) counit(6 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(17) counit(6 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(18) counit(6 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(19) counit(6 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(20) counit(6 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(21) counit(6 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(24) counit(6 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(27) counit(6 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(28) counit(6 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(33) counit(6 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(34) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(35) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(36) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(37) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(38) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(42) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(44) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(45) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(47) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(48) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(50) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(51) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(54) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(55) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Colorado
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(8) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ColoradoEDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(1) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(9) counit(8 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(10) counit(8 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(13) counit(8 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(17) counit(8 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(18) counit(8 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(19) counit(8 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(20) counit(8 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(21) counit(8 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(24) counit(8 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(27) counit(8 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(28) counit(8 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(33) counit(8 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(34) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(35) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(36) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(37) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(38) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(42) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(44) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(45) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(47) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(48) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(50) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(51) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(54) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(55) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Florida
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(12) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export FloridaEDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(12 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(12 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(12 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(12 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(12 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(12 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(12 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(12 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(12 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(12 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(12 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(12 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Louisiana
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(22) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export LouisianaEDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(1) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(9) counit(22 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(10) counit(22 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(13) counit(22 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(17) counit(22 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(18) counit(22 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(19) counit(22 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(20) counit(22 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(21) counit(22 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(24) counit(22 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(27) counit(22 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(28) counit(22 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(33) counit(22 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(34) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(35) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(36) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(37) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(38) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(42) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(44) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(45) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(47) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(48) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(50) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(51) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(54) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(55) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Maine
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(23) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MaineEDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(1) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(9) counit(23 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(10) counit(23 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(13) counit(23 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(17) counit(23 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(18) counit(23 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(19) counit(23 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(20) counit(23 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(21) counit(23 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(24) counit(23 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(27) counit(23 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(28) counit(23 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(33) counit(23 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(34) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(35) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(36) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(37) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(38) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(42) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(44) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(45) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(47) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(48) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(50) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(51) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(54) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14), trperiod(16) trunit(55) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Michigan
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(26) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MichiganEDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(26 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(26 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(26 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(26 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(26 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(26 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(26 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(26 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(26 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(26 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(26 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(26 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Missouri
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(29) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MissouriEDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(29 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(29 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(29 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(29 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(29 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(29 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(29 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(29 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(29 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(29 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(29 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(29 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Montana
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(30) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MontanaEDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(30 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(30 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(30 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(30 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(30 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(30 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(30 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(30 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(30 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(30 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(30 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(30 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Nevada
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(32) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export NevadaEDV2.ps



matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(1) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(9) counit(32 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(10) counit(32 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(13) counit(32 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(17) counit(32 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(18) counit(32 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(19) counit(32 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(20) counit(32 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(21) counit(32 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(24) counit(32 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(27) counit(32 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(28) counit(32 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(33) counit(32 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(34) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(35) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(36) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(37) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(38) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(42) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(44) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(45) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(47) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(48) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(50) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(51) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(54) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17), trperiod(19) trunit(55) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Ohio
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(39) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OhioEDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(39 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(39 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(39 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(39 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(39 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(39 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(39 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(39 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(39 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(39 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(39 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(39 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Oklahoma
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(40) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OklahomaEDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(1) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(9) counit(40 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(10) counit(40 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(13) counit(40 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(17) counit(40 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(18) counit(40 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(19) counit(40 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(20) counit(40 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(21) counit(40 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(24) counit(40 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(27) counit(40 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(28) counit(40 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(33) counit(40 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(34) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(35) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(36) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(37) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(38) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(42) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(44) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(45) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(47) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(48) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(50) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(51) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(54) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11), trperiod(13) trunit(55) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*South Dakota
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(46) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export SouthDakotaEDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(46 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(46 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(46 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(46 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(46 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(46 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(46 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(46 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(46 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(46 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(46 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(46 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


save enactdv2.dta


*************************************************************************************************************************************************
*Date of Implementation as Treatment Date
*************************************************************************************************************************************************

clear
use TermLimitsRun.dta

*Arizona
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(4) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ArizonaIDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local a=1
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local b=1
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(4 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(4 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(4 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(4 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(4 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(4 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(4 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(4 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(4 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(4 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(4 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(4 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Arkansas
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(5) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ArkansasIDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(1) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(9) counit(5 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(10) counit(5 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(13) counit(5 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(17) counit(5 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(18) counit(5 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(19) counit(5 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(20) counit(5 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(21) counit(5 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(24) counit(5 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(27) counit(5 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(28) counit(5 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(33) counit(5 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(34) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(35) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(36) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(37) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(38) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(42) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(44) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(45) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(47) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(48) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(50) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(51) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(54) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19),  trperiod(21) trunit(55) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*California
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(6) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export CaliforniaIDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(1) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(9) counit(6 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(10) counit(6 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(13) counit(6 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(17) counit(6 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(18) counit(6 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(19) counit(6 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(20) counit(6 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(21) counit(6 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(24) counit(6 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(27) counit(6 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(28) counit(6 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(33) counit(6 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(34) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(35) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(36) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(37) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(38) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(42) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(44) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(45) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(47) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(48) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(50) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(51) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(54) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(55) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Colorado
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(8) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ColoradoIDV2.ps



matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(1) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(9) counit(8 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(10) counit(8 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(13) counit(8 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(17) counit(8 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(18) counit(8 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(19) counit(8 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(20) counit(8 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(21) counit(8 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(24) counit(8 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(27) counit(8 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(28) counit(8 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(33) counit(8 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(34) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(35) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(36) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(37) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(38) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(42) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(44) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(45) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(47) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(48) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(50) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(51) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(54) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(55) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Florida
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(12) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export FloridaIDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(12 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(12 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(12 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(12 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(12 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(12 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(12 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(12 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(12 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(12 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(12 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(12 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Maine
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(23) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MaineIDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(1) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(9) counit(23 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(10) counit(23 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(13) counit(23 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(17) counit(23 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(18) counit(23 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(19) counit(23 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(20) counit(23 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(21) counit(23 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(24) counit(23 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(27) counit(23 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(28) counit(23 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(33) counit(23 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(34) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(35) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(36) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(37) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(38) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(42) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(44) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(45) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(47) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(48) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(50) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(51) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(54) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16), trperiod(18) trunit(55) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Michigan
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(26) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MichiganIDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(1) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(9) counit(26 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(10) counit(26 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(13) counit(26 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(17) counit(26 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(18) counit(26 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(19) counit(26 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(20) counit(26 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(21) counit(26 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(24) counit(26 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(27) counit(26 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(28) counit(26 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(33) counit(26 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(34) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(35) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(36) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(37) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(38) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(42) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(44) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(45) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(47) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(48) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(50) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(51) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(54) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18),  trperiod(20) trunit(55) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Montana
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(30) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MontanaIDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(30 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(30 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(30 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(30 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(30 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(30 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(30 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(30 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(30 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(30 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(30 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(30 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Ohio
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(39) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OhioIDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(39 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(39 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(39 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(39 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(39 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(39 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(39 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(39 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(39 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(39 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(39 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(39 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*South Dakota
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(46) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export SouthDakotaIDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(46 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(46 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(46 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(46 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(46 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(46 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(46 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(46 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(46 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(46 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(46 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(46 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15) Educ_Exp_Per_Capita(16) Educ_Exp_Per_Capita(17) Educ_Exp_Per_Capita(18) Educ_Exp_Per_Capita(19) Educ_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



save implemdv2.dta


*************************************************************************************************************************************************
*Repeal States
*************************************************************************************************************************************************

clear
use TermLimitsRun.dta

*Idaho
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(16) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export IdahoRDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local a=1
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local b=1
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(1) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(9) counit(16 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(10) counit(16 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(13) counit(16 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(17) counit(16 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(18) counit(16 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(19) counit(16 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(20) counit(16 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(21) counit(16 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(24) counit(16 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(27) counit(16 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(28) counit(16 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(33) counit(16 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(34) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(35) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(36) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(37) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(38) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(42) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(44) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(45) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(47) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(48) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(50) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(51) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(54) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(55) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Massachusetts
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(25) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export MassachusettsRDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(1) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(9) counit(25 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(10) counit(25 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(13) counit(25 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(17) counit(25 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(18) counit(25 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(19) counit(25 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(20) counit(25 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(21) counit(25 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(24) counit(25 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(27) counit(25 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(28) counit(25 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(33) counit(25 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(34) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(35) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(36) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(37) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(38) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(42) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(44) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(45) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(47) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(48) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(50) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(51) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(54) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(55) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Oregon
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(41) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OregonRDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(41 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(41 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(41 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(41 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(41 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(41 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(41 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(41 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(41 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(41 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(41 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(41 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Utah
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(49) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export UtahRDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(1) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(9) counit(49 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(10) counit(49 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(13) counit(49 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(17) counit(49 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(18) counit(49 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(19) counit(49 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(20) counit(49 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(21) counit(49 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(24) counit(49 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(27) counit(49 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(28) counit(49 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(33) counit(49 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(34) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(35) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(36) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(37) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(38) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(42) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(44) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(45) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(47) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(48) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(50) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(51) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(54) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13) Educ_Exp_Per_Capita(14) Educ_Exp_Per_Capita(15),  trperiod(17) trunit(55) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Washington
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(53) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export WashingtonRDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(53 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(53 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(53 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(53 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(53 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(53 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(53 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(53 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(53 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(53 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(53 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(53 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Wyoming
qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(56) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export WyomingRDV2.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(56 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(56 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(56 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(56 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(56 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(56 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(56 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(56 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(56 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(56 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(56 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(56 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Educ_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Educ_Exp_Per_Capita(1) Educ_Exp_Per_Capita(2) Educ_Exp_Per_Capita(3) Educ_Exp_Per_Capita(4) Educ_Exp_Per_Capita(5) Educ_Exp_Per_Capita(6) Educ_Exp_Per_Capita(7) Educ_Exp_Per_Capita(8) Educ_Exp_Per_Capita(9) Educ_Exp_Per_Capita(10) Educ_Exp_Per_Capita(11) Educ_Exp_Per_Capita(12) Educ_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

save repealdv2.dta


*****************************************************
*****************************************************
***** EXPENDITURES/INCOME******************************
*****************************************************
*****************************************************

*************************************************************************************************************************************************
*Date of Enactment as Treatment Date
*************************************************************************************************************************************************

clear
use TermLimitsRun.dta

*Arizona
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(4) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export ArizonaEDV3.ps

matrix A = e(W_weights)
matselrc A B, c(2)
local a=1
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local b=1
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(1) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(9) counit(4 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(10) counit(4 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(13) counit(4 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(17) counit(4 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(18) counit(4 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(19) counit(4 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(20) counit(4 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(21) counit(4 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(24) counit(4 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(27) counit(4 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(28) counit(4 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(33) counit(4 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(34) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(35) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(36) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(37) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(38) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(42) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(44) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(45) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(47) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(48) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(50) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(51) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(54) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(55) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Arkansas
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(5) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ArkansasEDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(1) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(9) counit(5 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(10) counit(5 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(13) counit(5 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(17) counit(5 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(18) counit(5 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(19) counit(5 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(20) counit(5 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(21) counit(5 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(24) counit(5 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(27) counit(5 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(28) counit(5 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(33) counit(5 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(34) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(35) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(36) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(37) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(38) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(42) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(44) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(45) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(47) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(48) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(50) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(51) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(54) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(55) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*California
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(6) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export CaliforniaEDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(1) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(9) counit(6 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(10) counit(6 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(13) counit(6 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(17) counit(6 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(18) counit(6 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(19) counit(6 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(20) counit(6 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(21) counit(6 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(24) counit(6 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(27) counit(6 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(28) counit(6 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(33) counit(6 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(34) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(35) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(36) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(37) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(38) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(42) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(44) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(45) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(47) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(48) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(50) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(51) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(54) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(55) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Colorado
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(8) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ColoradoEDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(1) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(9) counit(8 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(10) counit(8 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(13) counit(8 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(17) counit(8 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(18) counit(8 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(19) counit(8 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(20) counit(8 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(21) counit(8 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(24) counit(8 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(27) counit(8 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(28) counit(8 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(33) counit(8 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(34) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(35) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(36) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(37) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(38) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(42) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(44) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(45) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(47) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(48) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(50) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(51) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(54) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(55) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Florida
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(12) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export FloridaEDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(1) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(9) counit(12 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(10) counit(12 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(13) counit(12 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(17) counit(12 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(18) counit(12 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(19) counit(12 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(20) counit(12 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(21) counit(12 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(24) counit(12 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(27) counit(12 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(28) counit(12 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(33) counit(12 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(34) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(35) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(36) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(37) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(38) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(42) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(44) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(45) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(47) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(48) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(50) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(51) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(54) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(55) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Louisiana
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(22) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export LouisianaEDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(1) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(9) counit(22 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(10) counit(22 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(13) counit(22 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(17) counit(22 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(18) counit(22 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(19) counit(22 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(20) counit(22 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(21) counit(22 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(24) counit(22 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(27) counit(22 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(28) counit(22 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(33) counit(22 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(34) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(35) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(36) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(37) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(38) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(42) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(44) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(45) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(47) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(48) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(50) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(51) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(54) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(55) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Maine
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(23) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MaineEDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(1) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(9) counit(23 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(10) counit(23 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(13) counit(23 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(17) counit(23 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(18) counit(23 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(19) counit(23 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(20) counit(23 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(21) counit(23 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(24) counit(23 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(27) counit(23 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(28) counit(23 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(33) counit(23 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(34) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(35) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(36) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(37) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(38) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(42) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(44) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(45) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(47) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(48) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(50) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(51) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(54) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14), trperiod(16) trunit(55) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Michigan
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(26) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MichiganEDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(1) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(9) counit(26 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(10) counit(26 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(13) counit(26 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(17) counit(26 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(18) counit(26 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(19) counit(26 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(20) counit(26 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(21) counit(26 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(24) counit(26 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(27) counit(26 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(28) counit(26 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(33) counit(26 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(34) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(35) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(36) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(37) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(38) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(42) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(44) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(45) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(47) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(48) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(50) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(51) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(54) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(55) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Missouri
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(29) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MissouriEDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(1) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(9) counit(29 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(10) counit(29 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(13) counit(29 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(17) counit(29 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(18) counit(29 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(19) counit(29 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(20) counit(29 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(21) counit(29 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(24) counit(29 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(27) counit(29 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(28) counit(29 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(33) counit(29 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(34) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(35) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(36) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(37) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(38) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(42) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(44) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(45) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(47) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(48) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(50) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(51) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(54) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(55) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Montana
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(30) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MontanaEDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(1) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(9) counit(30 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(10) counit(30 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(13) counit(30 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(17) counit(30 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(18) counit(30 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(19) counit(30 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(20) counit(30 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(21) counit(30 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(24) counit(30 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(27) counit(30 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(28) counit(30 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(33) counit(30 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(34) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(35) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(36) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(37) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(38) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(42) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(44) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(45) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(47) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(48) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(50) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(51) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(54) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(55) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Nevada
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(32) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export NevadaEDV3.ps



matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(1) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(9) counit(32 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(10) counit(32 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(13) counit(32 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(17) counit(32 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(18) counit(32 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(19) counit(32 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(20) counit(32 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(21) counit(32 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(24) counit(32 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(27) counit(32 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(28) counit(32 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(33) counit(32 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(34) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(35) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(36) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(37) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(38) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(42) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(44) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(45) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(47) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(48) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(50) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(51) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(54) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17), trperiod(19) trunit(55) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Ohio
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(39) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OhioEDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(1) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(9) counit(39 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(10) counit(39 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(13) counit(39 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(17) counit(39 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(18) counit(39 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(19) counit(39 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(20) counit(39 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(21) counit(39 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(24) counit(39 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(27) counit(39 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(28) counit(39 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(33) counit(39 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(34) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(35) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(36) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(37) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(38) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(42) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(44) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(45) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(47) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(48) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(50) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(51) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(54) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(55) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Oklahoma
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(40) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OklahomaEDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(1) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(9) counit(40 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(10) counit(40 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(13) counit(40 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(17) counit(40 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(18) counit(40 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(19) counit(40 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(20) counit(40 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(21) counit(40 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(24) counit(40 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(27) counit(40 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(28) counit(40 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(33) counit(40 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(34) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(35) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(36) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(37) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(38) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(42) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(44) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(45) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(47) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(48) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(50) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(51) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(54) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11), trperiod(13) trunit(55) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*South Dakota
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(46) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export SouthDakotaEDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(1) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(9) counit(46 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(10) counit(46 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(13) counit(46 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(17) counit(46 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(18) counit(46 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(19) counit(46 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(20) counit(46 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(21) counit(46 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(24) counit(46 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(27) counit(46 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(28) counit(46 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(33) counit(46 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(34) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(35) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(36) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(37) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(38) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(42) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(44) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(45) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(47) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(48) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(50) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(51) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(54) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(55) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



save enactdv3.dta

*************************************************************************************************************************************************
*Date of Implementation as Treatment Date
*************************************************************************************************************************************************

clear
use TermLimitsRun.dta

*Arizona
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(4) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ArizonaIDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local a=1
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local b=1
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(1) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(9) counit(4 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(10) counit(4 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(13) counit(4 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(17) counit(4 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(18) counit(4 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(19) counit(4 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(20) counit(4 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(21) counit(4 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(24) counit(4 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(27) counit(4 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(28) counit(4 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(33) counit(4 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(34) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(35) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(36) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(37) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(38) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(42) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(44) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(45) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(47) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(48) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(50) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(51) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(54) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(55) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Arkansas
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(5) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ArkansasIDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(1) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(9) counit(5 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(10) counit(5 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(13) counit(5 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(17) counit(5 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(18) counit(5 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(19) counit(5 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(20) counit(5 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(21) counit(5 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(24) counit(5 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(27) counit(5 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(28) counit(5 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(33) counit(5 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(34) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(35) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(36) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(37) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(38) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(42) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(44) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(45) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(47) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(48) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(50) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(51) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(54) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19),  trperiod(21) trunit(55) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*California
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(6) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export CaliforniaIDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(1) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(9) counit(6 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(10) counit(6 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(13) counit(6 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(17) counit(6 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(18) counit(6 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(19) counit(6 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(20) counit(6 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(21) counit(6 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(24) counit(6 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(27) counit(6 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(28) counit(6 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(33) counit(6 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(34) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(35) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(36) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(37) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(38) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(42) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(44) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(45) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(47) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(48) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(50) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(51) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(54) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(55) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Colorado
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(8) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ColoradoIDV3.ps



matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(1) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(9) counit(8 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(10) counit(8 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(13) counit(8 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(17) counit(8 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(18) counit(8 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(19) counit(8 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(20) counit(8 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(21) counit(8 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(24) counit(8 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(27) counit(8 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(28) counit(8 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(33) counit(8 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(34) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(35) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(36) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(37) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(38) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(42) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(44) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(45) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(47) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(48) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(50) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(51) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(54) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(55) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Florida
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(12) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export FloridaIDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(1) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(9) counit(12 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(10) counit(12 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(13) counit(12 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(17) counit(12 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(18) counit(12 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(19) counit(12 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(20) counit(12 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(21) counit(12 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(24) counit(12 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(27) counit(12 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(28) counit(12 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(33) counit(12 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(34) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(35) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(36) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(37) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(38) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(42) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(44) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(45) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(47) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(48) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(50) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(51) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(54) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(55) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Maine
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(23) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MaineIDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(1) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(9) counit(23 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(10) counit(23 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(13) counit(23 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(17) counit(23 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(18) counit(23 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(19) counit(23 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(20) counit(23 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(21) counit(23 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(24) counit(23 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(27) counit(23 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(28) counit(23 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(33) counit(23 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(34) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(35) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(36) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(37) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(38) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(42) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(44) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(45) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(47) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(48) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(50) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(51) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(54) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16), trperiod(18) trunit(55) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Michigan
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(26) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MichiganIDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(1) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(9) counit(26 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(10) counit(26 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(13) counit(26 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(17) counit(26 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(18) counit(26 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(19) counit(26 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(20) counit(26 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(21) counit(26 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(24) counit(26 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(27) counit(26 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(28) counit(26 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(33) counit(26 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(34) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(35) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(36) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(37) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(38) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(42) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(44) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(45) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(47) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(48) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(50) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(51) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(54) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18),  trperiod(20) trunit(55) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Montana
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(30) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MontanaIDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(1) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(9) counit(30 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(10) counit(30 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(13) counit(30 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(17) counit(30 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(18) counit(30 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(19) counit(30 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(20) counit(30 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(21) counit(30 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(24) counit(30 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(27) counit(30 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(28) counit(30 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(33) counit(30 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(34) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(35) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(36) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(37) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(38) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(42) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(44) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(45) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(47) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(48) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(50) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(51) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(54) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(55) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Ohio
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(39) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OhioIDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(1) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(9) counit(39 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(10) counit(39 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(13) counit(39 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(17) counit(39 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(18) counit(39 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(19) counit(39 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(20) counit(39 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(21) counit(39 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(24) counit(39 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(27) counit(39 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(28) counit(39 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(33) counit(39 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(34) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(35) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(36) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(37) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(38) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(42) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(44) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(45) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(47) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(48) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(50) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(51) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(54) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(55) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*South Dakota
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(46) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export SouthDakotaIDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(1) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(9) counit(46 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(10) counit(46 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(13) counit(46 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(17) counit(46 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(18) counit(46 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(19) counit(46 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(20) counit(46 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(21) counit(46 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(24) counit(46 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(27) counit(46 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(28) counit(46 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(33) counit(46 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(34) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(35) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(36) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(37) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(38) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(42) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(44) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(45) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(47) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(48) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(50) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(51) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(54) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15) Exp_Divided_by_Income(16) Exp_Divided_by_Income(17) Exp_Divided_by_Income(18) Exp_Divided_by_Income(19) Exp_Divided_by_Income(20), trperiod(22) trunit(55) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


save implemdv3.dta



*************************************************************************************************************************************************
*Repeal States
*************************************************************************************************************************************************

clear
use TermLimitsRun.dta


*Idaho
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(16) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export IdahoRDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local a=1
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local b=1
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(1) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(9) counit(16 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(10) counit(16 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(13) counit(16 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(17) counit(16 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(18) counit(16 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(19) counit(16 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(20) counit(16 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(21) counit(16 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(24) counit(16 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(27) counit(16 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(28) counit(16 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(33) counit(16 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(34) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(35) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(36) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(37) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(38) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(42) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(44) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(45) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(47) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(48) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(50) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(51) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(54) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(55) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Massachusetts
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(25) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export MassachusettsRDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(1) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(9) counit(25 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(10) counit(25 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(13) counit(25 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(17) counit(25 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(18) counit(25 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(19) counit(25 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(20) counit(25 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(21) counit(25 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(24) counit(25 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(27) counit(25 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(28) counit(25 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(33) counit(25 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(34) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(35) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(36) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(37) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(38) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(42) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(44) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(45) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(47) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(48) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(50) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(51) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(54) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(55) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Oregon
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(41) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OregonRDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(1) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(9) counit(41 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(10) counit(41 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(13) counit(41 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(17) counit(41 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(18) counit(41 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(19) counit(41 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(20) counit(41 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(21) counit(41 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(24) counit(41 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(27) counit(41 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(28) counit(41 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(33) counit(41 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(34) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(35) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(36) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(37) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(38) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(42) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(44) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(45) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(47) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(48) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(50) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(51) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(54) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(55) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Utah
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(49) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export UtahRDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(1) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(9) counit(49 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(10) counit(49 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(13) counit(49 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(17) counit(49 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(18) counit(49 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(19) counit(49 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(20) counit(49 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(21) counit(49 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(24) counit(49 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(27) counit(49 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(28) counit(49 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(33) counit(49 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(34) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(35) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(36) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(37) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(38) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(42) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(44) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(45) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(47) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(48) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(50) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(51) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(54) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13) Exp_Divided_by_Income(14) Exp_Divided_by_Income(15),  trperiod(17) trunit(55) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Washington
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(53) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export WashingtonRDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(1) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(9) counit(53 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(10) counit(53 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(13) counit(53 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(17) counit(53 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(18) counit(53 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(19) counit(53 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(20) counit(53 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(21) counit(53 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(24) counit(53 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(27) counit(53 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(28) counit(53 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(33) counit(53 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(34) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(35) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(36) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(37) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(38) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(42) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(44) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(45) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(47) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(48) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(50) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(51) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(54) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(55) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Wyoming
qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(56) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export WyomingRDV3.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(1) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(9) counit(56 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(10) counit(56 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(13) counit(56 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(17) counit(56 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(18) counit(56 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(19) counit(56 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(20) counit(56 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(21) counit(56 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(24) counit(56 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(27) counit(56 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(28) counit(56 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(33) counit(56 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(34) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(35) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(36) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(37) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(38) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(42) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(44) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(45) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(47) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(48) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(50) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(51) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(54) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Exp_Divided_by_Income population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Exp_Divided_by_Income(1) Exp_Divided_by_Income(2) Exp_Divided_by_Income(3) Exp_Divided_by_Income(4) Exp_Divided_by_Income(5) Exp_Divided_by_Income(6) Exp_Divided_by_Income(7) Exp_Divided_by_Income(8) Exp_Divided_by_Income(9) Exp_Divided_by_Income(10) Exp_Divided_by_Income(11) Exp_Divided_by_Income(12) Exp_Divided_by_Income(13), trperiod(15) trunit(55) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

save repealdv3.dta

*****************************************************
*****************************************************
***** HEALTH HOSPITALS EXPENDITURE******************************
*****************************************************
*****************************************************

*************************************************************************************************************************************************
*Date of Enactment as Treatment Date
*************************************************************************************************************************************************

clear
use TermLimitsRun.dta

*Arizona
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(4) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export ArizonaEDV4.ps

matrix A = e(W_weights)
matselrc A B, c(2)
local a=1
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local b=1
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(4 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(4 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(4 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(4 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(4 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(4 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(4 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(4 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(4 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(4 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(4 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(4 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Arkansas
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(5) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ArkansasEDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(5 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(5 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(5 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(5 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(5 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(5 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(5 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(5 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(5 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(5 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(5 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(5 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*California
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(6) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export CaliforniaEDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(1) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(9) counit(6 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(10) counit(6 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(13) counit(6 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(17) counit(6 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(18) counit(6 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(19) counit(6 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(20) counit(6 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(21) counit(6 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(24) counit(6 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(27) counit(6 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(28) counit(6 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(33) counit(6 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(34) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(35) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(36) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(37) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(38) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(42) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(44) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(45) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(47) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(48) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(50) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(51) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(54) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(55) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Colorado
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(8) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ColoradoEDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(1) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(9) counit(8 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(10) counit(8 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(13) counit(8 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(17) counit(8 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(18) counit(8 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(19) counit(8 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(20) counit(8 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(21) counit(8 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(24) counit(8 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(27) counit(8 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(28) counit(8 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(33) counit(8 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(34) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(35) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(36) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(37) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(38) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(42) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(44) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(45) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(47) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(48) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(50) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(51) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(54) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(55) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Florida
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(12) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export FloridaEDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(12 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(12 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(12 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(12 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(12 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(12 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(12 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(12 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(12 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(12 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(12 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(12 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Louisiana
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(22) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export LouisianaEDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(1) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(9) counit(22 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(10) counit(22 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(13) counit(22 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(17) counit(22 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(18) counit(22 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(19) counit(22 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(20) counit(22 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(21) counit(22 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(24) counit(22 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(27) counit(22 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(28) counit(22 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(33) counit(22 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(34) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(35) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(36) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(37) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(38) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(42) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(44) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(45) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(47) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(48) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(50) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(51) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(54) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(55) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Maine
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(23) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MaineEDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(1) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(9) counit(23 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(10) counit(23 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(13) counit(23 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(17) counit(23 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(18) counit(23 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(19) counit(23 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(20) counit(23 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(21) counit(23 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(24) counit(23 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(27) counit(23 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(28) counit(23 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(33) counit(23 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(34) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(35) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(36) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(37) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(38) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(42) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(44) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(45) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(47) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(48) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(50) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(51) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(54) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14), trperiod(16) trunit(55) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Michigan
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(26) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MichiganEDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(26 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(26 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(26 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(26 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(26 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(26 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(26 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(26 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(26 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(26 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(26 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(26 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Missouri
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(29) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MissouriEDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(29 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(29 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(29 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(29 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(29 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(29 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(29 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(29 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(29 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(29 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(29 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(29 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Montana
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(30) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MontanaEDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(30 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(30 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(30 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(30 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(30 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(30 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(30 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(30 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(30 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(30 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(30 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(30 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Nevada
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(32) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export NevadaEDV4.ps



matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(1) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(9) counit(32 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(10) counit(32 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(13) counit(32 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(17) counit(32 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(18) counit(32 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(19) counit(32 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(20) counit(32 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(21) counit(32 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(24) counit(32 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(27) counit(32 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(28) counit(32 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(33) counit(32 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(34) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(35) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(36) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(37) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(38) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(42) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(44) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(45) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(47) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(48) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(50) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(51) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(54) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17), trperiod(19) trunit(55) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Ohio
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(39) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OhioEDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(39 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(39 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(39 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(39 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(39 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(39 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(39 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(39 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(39 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(39 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(39 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(39 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Oklahoma
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(40) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OklahomaEDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(1) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(9) counit(40 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(10) counit(40 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(13) counit(40 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(17) counit(40 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(18) counit(40 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(19) counit(40 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(20) counit(40 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(21) counit(40 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(24) counit(40 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(27) counit(40 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(28) counit(40 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(33) counit(40 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(34) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(35) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(36) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(37) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(38) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(42) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(44) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(45) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(47) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(48) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(50) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(51) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(54) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11), trperiod(13) trunit(55) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*South Dakota
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(46) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export SouthDakotaEDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(46 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(46 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(46 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(46 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(46 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(46 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(46 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(46 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(46 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(46 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(46 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(46 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


save enactdv4.dta


*************************************************************************************************************************************************
*Date of Implementation as Treatment Date
*************************************************************************************************************************************************

clear
use TermLimitsRun.dta

*Arizona
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(4) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ArizonaIDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local a=1
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local b=1
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(4 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(4 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(4 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(4 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(4 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(4 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(4 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(4 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(4 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(4 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(4 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(4 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Arkansas
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(5) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ArkansasIDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(1) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(9) counit(5 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(10) counit(5 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(13) counit(5 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(17) counit(5 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(18) counit(5 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(19) counit(5 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(20) counit(5 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(21) counit(5 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(24) counit(5 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(27) counit(5 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(28) counit(5 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(33) counit(5 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(34) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(35) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(36) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(37) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(38) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(42) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(44) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(45) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(47) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(48) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(50) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(51) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(54) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19),  trperiod(21) trunit(55) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*California
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(6) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export CaliforniaIDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(1) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(9) counit(6 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(10) counit(6 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(13) counit(6 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(17) counit(6 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(18) counit(6 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(19) counit(6 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(20) counit(6 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(21) counit(6 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(24) counit(6 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(27) counit(6 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(28) counit(6 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(33) counit(6 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(34) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(35) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(36) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(37) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(38) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(42) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(44) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(45) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(47) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(48) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(50) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(51) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(54) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(55) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Colorado
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(8) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ColoradoIDV4.ps



matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(1) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(9) counit(8 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(10) counit(8 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(13) counit(8 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(17) counit(8 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(18) counit(8 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(19) counit(8 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(20) counit(8 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(21) counit(8 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(24) counit(8 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(27) counit(8 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(28) counit(8 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(33) counit(8 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(34) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(35) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(36) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(37) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(38) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(42) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(44) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(45) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(47) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(48) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(50) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(51) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(54) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(55) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Florida
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(12) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export FloridaIDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(12 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(12 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(12 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(12 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(12 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(12 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(12 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(12 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(12 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(12 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(12 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(12 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Maine
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(23) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MaineIDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(1) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(9) counit(23 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(10) counit(23 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(13) counit(23 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(17) counit(23 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(18) counit(23 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(19) counit(23 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(20) counit(23 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(21) counit(23 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(24) counit(23 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(27) counit(23 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(28) counit(23 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(33) counit(23 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(34) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(35) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(36) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(37) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(38) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(42) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(44) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(45) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(47) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(48) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(50) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(51) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(54) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16), trperiod(18) trunit(55) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Michigan
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(26) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MichiganIDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(1) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(9) counit(26 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(10) counit(26 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(13) counit(26 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(17) counit(26 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(18) counit(26 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(19) counit(26 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(20) counit(26 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(21) counit(26 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(24) counit(26 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(27) counit(26 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(28) counit(26 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(33) counit(26 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(34) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(35) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(36) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(37) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(38) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(42) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(44) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(45) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(47) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(48) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(50) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(51) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(54) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18),  trperiod(20) trunit(55) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Montana
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(30) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MontanaIDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(30 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(30 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(30 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(30 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(30 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(30 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(30 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(30 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(30 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(30 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(30 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(30 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Ohio
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(39) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OhioIDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(39 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(39 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(39 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(39 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(39 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(39 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(39 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(39 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(39 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(39 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(39 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(39 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*South Dakota
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(46) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export SouthDakotaIDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(46 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(46 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(46 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(46 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(46 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(46 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(46 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(46 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(46 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(46 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(46 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(46 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15) HealthHosp_Exp_Per_Capita(16) HealthHosp_Exp_Per_Capita(17) HealthHosp_Exp_Per_Capita(18) HealthHosp_Exp_Per_Capita(19) HealthHosp_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



save implemdv4.dta


*************************************************************************************************************************************************
*Repeal States
*************************************************************************************************************************************************

clear
use TermLimitsRun.dta

*Idaho
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(16) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export IdahoRDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local a=1
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local b=1
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(1) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(9) counit(16 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(10) counit(16 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(13) counit(16 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(17) counit(16 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(18) counit(16 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(19) counit(16 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(20) counit(16 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(21) counit(16 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(24) counit(16 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(27) counit(16 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(28) counit(16 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(33) counit(16 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(34) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(35) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(36) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(37) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(38) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(42) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(44) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(45) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(47) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(48) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(50) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(51) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(54) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(55) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Massachusetts
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(25) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export MassachusettsRDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(1) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(9) counit(25 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(10) counit(25 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(13) counit(25 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(17) counit(25 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(18) counit(25 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(19) counit(25 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(20) counit(25 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(21) counit(25 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(24) counit(25 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(27) counit(25 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(28) counit(25 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(33) counit(25 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(34) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(35) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(36) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(37) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(38) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(42) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(44) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(45) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(47) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(48) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(50) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(51) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(54) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(55) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Oregon
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(41) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OregonRDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(41 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(41 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(41 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(41 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(41 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(41 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(41 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(41 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(41 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(41 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(41 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(41 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Utah
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(49) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export UtahRDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(1) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(9) counit(49 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(10) counit(49 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(13) counit(49 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(17) counit(49 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(18) counit(49 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(19) counit(49 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(20) counit(49 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(21) counit(49 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(24) counit(49 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(27) counit(49 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(28) counit(49 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(33) counit(49 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(34) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(35) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(36) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(37) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(38) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(42) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(44) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(45) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(47) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(48) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(50) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(51) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(54) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13) HealthHosp_Exp_Per_Capita(14) HealthHosp_Exp_Per_Capita(15),  trperiod(17) trunit(55) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Washington
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(53) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export WashingtonRDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(53 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(53 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(53 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(53 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(53 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(53 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(53 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(53 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(53 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(53 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(53 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(53 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Wyoming
qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(56) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export WyomingRDV4.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(56 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(56 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(56 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(56 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(56 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(56 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(56 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(56 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(56 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(56 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(56 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(56 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth HealthHosp_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit HealthHosp_Exp_Per_Capita(1) HealthHosp_Exp_Per_Capita(2) HealthHosp_Exp_Per_Capita(3) HealthHosp_Exp_Per_Capita(4) HealthHosp_Exp_Per_Capita(5) HealthHosp_Exp_Per_Capita(6) HealthHosp_Exp_Per_Capita(7) HealthHosp_Exp_Per_Capita(8) HealthHosp_Exp_Per_Capita(9) HealthHosp_Exp_Per_Capita(10) HealthHosp_Exp_Per_Capita(11) HealthHosp_Exp_Per_Capita(12) HealthHosp_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

save repealdv4.dta

*****************************************************
*****************************************************
***** HIGHWAY EXPENDITURE******************************
*****************************************************
*****************************************************

*************************************************************************************************************************************************
*Date of Enactment as Treatment Date
*************************************************************************************************************************************************

clear
use TermLimitsRun.dta

*Arizona
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(4) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export ArizonaEDV5.ps

matrix A = e(W_weights)
matselrc A B, c(2)
local a=1
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local b=1
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(4 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(4 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(4 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(4 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(4 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(4 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(4 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(4 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(4 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(4 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(4 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(4 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Arkansas
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(5) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ArkansasEDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(5 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(5 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(5 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(5 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(5 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(5 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(5 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(5 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(5 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(5 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(5 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(5 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*California
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(6) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export CaliforniaEDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(1) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(9) counit(6 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(10) counit(6 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(13) counit(6 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(17) counit(6 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(18) counit(6 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(19) counit(6 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(20) counit(6 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(21) counit(6 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(24) counit(6 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(27) counit(6 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(28) counit(6 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(33) counit(6 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(34) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(35) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(36) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(37) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(38) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(42) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(44) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(45) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(47) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(48) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(50) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(51) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(54) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(55) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Colorado
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(8) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ColoradoEDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(1) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(9) counit(8 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(10) counit(8 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(13) counit(8 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(17) counit(8 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(18) counit(8 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(19) counit(8 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(20) counit(8 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(21) counit(8 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(24) counit(8 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(27) counit(8 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(28) counit(8 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(33) counit(8 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(34) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(35) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(36) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(37) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(38) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(42) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(44) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(45) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(47) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(48) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(50) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(51) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(54) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(55) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Florida
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(12) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export FloridaEDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(12 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(12 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(12 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(12 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(12 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(12 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(12 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(12 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(12 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(12 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(12 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(12 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Louisiana
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(22) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export LouisianaEDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(1) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(9) counit(22 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(10) counit(22 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(13) counit(22 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(17) counit(22 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(18) counit(22 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(19) counit(22 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(20) counit(22 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(21) counit(22 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(24) counit(22 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(27) counit(22 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(28) counit(22 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(33) counit(22 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(34) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(35) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(36) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(37) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(38) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(42) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(44) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(45) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(47) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(48) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(50) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(51) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(54) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(55) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Maine
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(23) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MaineEDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(1) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(9) counit(23 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(10) counit(23 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(13) counit(23 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(17) counit(23 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(18) counit(23 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(19) counit(23 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(20) counit(23 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(21) counit(23 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(24) counit(23 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(27) counit(23 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(28) counit(23 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(33) counit(23 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(34) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(35) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(36) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(37) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(38) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(42) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(44) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(45) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(47) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(48) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(50) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(51) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(54) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14), trperiod(16) trunit(55) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Michigan
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(26) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MichiganEDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(26 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(26 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(26 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(26 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(26 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(26 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(26 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(26 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(26 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(26 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(26 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(26 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Missouri
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(29) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MissouriEDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(29 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(29 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(29 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(29 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(29 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(29 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(29 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(29 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(29 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(29 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(29 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(29 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Montana
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(30) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MontanaEDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(30 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(30 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(30 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(30 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(30 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(30 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(30 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(30 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(30 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(30 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(30 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(30 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Nevada
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(32) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export NevadaEDV5.ps



matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(1) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(9) counit(32 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(10) counit(32 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(13) counit(32 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(17) counit(32 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(18) counit(32 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(19) counit(32 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(20) counit(32 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(21) counit(32 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(24) counit(32 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(27) counit(32 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(28) counit(32 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(33) counit(32 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(34) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(35) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(36) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(37) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(38) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(42) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(44) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(45) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(47) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(48) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(50) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(51) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(54) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17), trperiod(19) trunit(55) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Ohio
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(39) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OhioEDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(39 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(39 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(39 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(39 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(39 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(39 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(39 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(39 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(39 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(39 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(39 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(39 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Oklahoma
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(40) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OklahomaEDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(1) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(9) counit(40 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(10) counit(40 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(13) counit(40 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(17) counit(40 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(18) counit(40 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(19) counit(40 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(20) counit(40 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(21) counit(40 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(24) counit(40 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(27) counit(40 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(28) counit(40 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(33) counit(40 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(34) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(35) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(36) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(37) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(38) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(42) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(44) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(45) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(47) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(48) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(50) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(51) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(54) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11), trperiod(13) trunit(55) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*South Dakota
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(46) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export SouthDakotaEDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(46 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(46 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(46 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(46 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(46 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(46 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(46 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(46 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(46 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(46 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(46 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(46 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

save enactdv5.dta



*************************************************************************************************************************************************
*Date of Implementation as Treatment Date
*************************************************************************************************************************************************

clear
use TermLimitsRun.dta

*Arizona
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(4) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ArizonaIDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local a=1
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local b=1
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(4 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(4 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(4 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(4 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(4 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(4 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(4 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(4 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(4 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(4 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(4 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(4 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Arkansas
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(5) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ArkansasIDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(1) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(9) counit(5 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(10) counit(5 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(13) counit(5 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(17) counit(5 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(18) counit(5 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(19) counit(5 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(20) counit(5 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(21) counit(5 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(24) counit(5 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(27) counit(5 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(28) counit(5 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(33) counit(5 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(34) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(35) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(36) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(37) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(38) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(42) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(44) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(45) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(47) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(48) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(50) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(51) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(54) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19),  trperiod(21) trunit(55) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*California
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(6) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export CaliforniaIDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(1) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(9) counit(6 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(10) counit(6 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(13) counit(6 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(17) counit(6 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(18) counit(6 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(19) counit(6 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(20) counit(6 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(21) counit(6 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(24) counit(6 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(27) counit(6 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(28) counit(6 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(33) counit(6 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(34) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(35) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(36) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(37) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(38) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(42) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(44) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(45) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(47) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(48) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(50) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(51) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(54) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(55) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Colorado
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(8) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ColoradoIDV5.ps



matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(1) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(9) counit(8 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(10) counit(8 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(13) counit(8 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(17) counit(8 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(18) counit(8 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(19) counit(8 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(20) counit(8 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(21) counit(8 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(24) counit(8 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(27) counit(8 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(28) counit(8 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(33) counit(8 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(34) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(35) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(36) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(37) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(38) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(42) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(44) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(45) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(47) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(48) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(50) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(51) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(54) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(55) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Florida
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(12) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export FloridaIDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(12 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(12 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(12 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(12 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(12 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(12 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(12 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(12 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(12 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(12 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(12 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(12 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Maine
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(23) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MaineIDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(1) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(9) counit(23 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(10) counit(23 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(13) counit(23 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(17) counit(23 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(18) counit(23 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(19) counit(23 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(20) counit(23 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(21) counit(23 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(24) counit(23 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(27) counit(23 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(28) counit(23 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(33) counit(23 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(34) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(35) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(36) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(37) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(38) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(42) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(44) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(45) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(47) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(48) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(50) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(51) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(54) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16), trperiod(18) trunit(55) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Michigan
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(26) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MichiganIDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(1) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(9) counit(26 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(10) counit(26 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(13) counit(26 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(17) counit(26 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(18) counit(26 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(19) counit(26 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(20) counit(26 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(21) counit(26 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(24) counit(26 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(27) counit(26 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(28) counit(26 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(33) counit(26 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(34) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(35) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(36) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(37) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(38) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(42) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(44) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(45) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(47) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(48) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(50) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(51) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(54) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18),  trperiod(20) trunit(55) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Montana
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(30) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MontanaIDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(30 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(30 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(30 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(30 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(30 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(30 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(30 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(30 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(30 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(30 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(30 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(30 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Ohio
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(39) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OhioIDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(39 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(39 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(39 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(39 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(39 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(39 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(39 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(39 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(39 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(39 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(39 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(39 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*South Dakota
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(46) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export SouthDakotaIDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(46 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(46 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(46 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(46 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(46 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(46 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(46 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(46 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(46 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(46 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(46 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(46 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15) Highway_Exp_Per_Capita(16) Highway_Exp_Per_Capita(17) Highway_Exp_Per_Capita(18) Highway_Exp_Per_Capita(19) Highway_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



save implemdv5.dta


*************************************************************************************************************************************************
*Repeal States
*************************************************************************************************************************************************

clear
use TermLimitsRun.dta

*Idaho
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(16) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export IdahoRDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local a=1
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local b=1
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(1) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(9) counit(16 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(10) counit(16 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(13) counit(16 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(17) counit(16 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(18) counit(16 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(19) counit(16 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(20) counit(16 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(21) counit(16 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(24) counit(16 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(27) counit(16 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(28) counit(16 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(33) counit(16 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(34) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(35) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(36) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(37) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(38) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(42) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(44) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(45) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(47) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(48) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(50) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(51) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(54) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(55) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Massachusetts
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(25) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export MassachusettsRDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(1) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(9) counit(25 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(10) counit(25 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(13) counit(25 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(17) counit(25 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(18) counit(25 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(19) counit(25 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(20) counit(25 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(21) counit(25 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(24) counit(25 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(27) counit(25 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(28) counit(25 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(33) counit(25 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(34) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(35) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(36) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(37) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(38) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(42) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(44) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(45) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(47) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(48) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(50) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(51) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(54) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(55) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Oregon
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(41) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OregonRDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(41 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(41 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(41 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(41 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(41 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(41 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(41 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(41 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(41 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(41 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(41 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(41 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Utah
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(49) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export UtahRDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(1) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(9) counit(49 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(10) counit(49 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(13) counit(49 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(17) counit(49 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(18) counit(49 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(19) counit(49 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(20) counit(49 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(21) counit(49 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(24) counit(49 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(27) counit(49 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(28) counit(49 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(33) counit(49 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(34) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(35) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(36) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(37) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(38) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(42) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(44) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(45) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(47) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(48) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(50) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(51) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(54) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13) Highway_Exp_Per_Capita(14) Highway_Exp_Per_Capita(15),  trperiod(17) trunit(55) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Washington
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(53) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export WashingtonRDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(53 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(53 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(53 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(53 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(53 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(53 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(53 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(53 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(53 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(53 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(53 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(53 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Wyoming
qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(56) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export WyomingRDV5.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(56 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(56 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(56 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(56 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(56 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(56 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(56 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(56 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(56 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(56 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(56 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(56 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Highway_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Highway_Exp_Per_Capita(1) Highway_Exp_Per_Capita(2) Highway_Exp_Per_Capita(3) Highway_Exp_Per_Capita(4) Highway_Exp_Per_Capita(5) Highway_Exp_Per_Capita(6) Highway_Exp_Per_Capita(7) Highway_Exp_Per_Capita(8) Highway_Exp_Per_Capita(9) Highway_Exp_Per_Capita(10) Highway_Exp_Per_Capita(11) Highway_Exp_Per_Capita(12) Highway_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

save repealdv5.dta

*****************************************************
*****************************************************
***** WELFARE EXPENDITURE******************************
*****************************************************
*****************************************************

*************************************************************************************************************************************************
*Date of Enactment as Treatment Date
*************************************************************************************************************************************************

clear
use TermLimitsRun.dta

*Arizona
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(4) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export ArizonaEDV6.ps

matrix A = e(W_weights)
matselrc A B, c(2)
local a=1
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local b=1
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(4 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(4 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(4 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(4 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(4 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(4 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(4 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(4 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(4 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(4 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(4 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(4 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Arkansas
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(5) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ArkansasEDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(5 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(5 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(5 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(5 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(5 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(5 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(5 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(5 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(5 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(5 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(5 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(5 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*California
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(6) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export CaliforniaEDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(1) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(9) counit(6 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(10) counit(6 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(13) counit(6 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(17) counit(6 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(18) counit(6 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(19) counit(6 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(20) counit(6 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(21) counit(6 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(24) counit(6 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(27) counit(6 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(28) counit(6 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(33) counit(6 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(34) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(35) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(36) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(37) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(38) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(42) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(44) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(45) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(47) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(48) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(50) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(51) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(54) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(55) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Colorado
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(8) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ColoradoEDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(1) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(9) counit(8 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(10) counit(8 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(13) counit(8 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(17) counit(8 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(18) counit(8 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(19) counit(8 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(20) counit(8 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(21) counit(8 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(24) counit(8 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(27) counit(8 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(28) counit(8 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(33) counit(8 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(34) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(35) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(36) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(37) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(38) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(42) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(44) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(45) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(47) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(48) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(50) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(51) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(54) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(55) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Florida
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(12) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export FloridaEDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(12 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(12 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(12 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(12 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(12 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(12 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(12 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(12 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(12 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(12 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(12 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(12 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Louisiana
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(22) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export LouisianaEDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(1) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(9) counit(22 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(10) counit(22 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(13) counit(22 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(17) counit(22 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(18) counit(22 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(19) counit(22 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(20) counit(22 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(21) counit(22 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(24) counit(22 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(27) counit(22 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(28) counit(22 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(33) counit(22 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(34) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(35) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(36) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(37) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(38) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(42) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(44) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(45) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(47) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(48) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(50) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(51) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(54) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(55) counit(22 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Maine
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(23) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MaineEDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(1) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(9) counit(23 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(10) counit(23 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(13) counit(23 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(17) counit(23 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(18) counit(23 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(19) counit(23 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(20) counit(23 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(21) counit(23 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(24) counit(23 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(27) counit(23 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(28) counit(23 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(33) counit(23 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(34) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(35) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(36) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(37) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(38) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(42) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(44) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(45) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(47) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(48) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(50) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(51) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(54) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14), trperiod(16) trunit(55) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Michigan
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(26) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MichiganEDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(26 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(26 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(26 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(26 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(26 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(26 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(26 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(26 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(26 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(26 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(26 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(26 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Missouri
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(29) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MissouriEDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(29 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(29 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(29 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(29 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(29 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(29 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(29 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(29 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(29 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(29 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(29 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(29 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(29 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Montana
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(30) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MontanaEDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(30 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(30 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(30 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(30 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(30 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(30 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(30 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(30 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(30 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(30 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(30 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(30 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Nevada
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(32) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export NevadaEDV6.ps



matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(1) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(9) counit(32 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(10) counit(32 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(13) counit(32 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(17) counit(32 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(18) counit(32 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(19) counit(32 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(20) counit(32 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(21) counit(32 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(24) counit(32 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(27) counit(32 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(28) counit(32 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(33) counit(32 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(34) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(35) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(36) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(37) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(38) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(42) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(44) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(45) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(47) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(48) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(50) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(51) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(54) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17), trperiod(19) trunit(55) counit(32 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Ohio
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(39) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OhioEDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(39 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(39 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(39 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(39 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(39 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(39 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(39 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(39 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(39 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(39 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(39 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(39 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Oklahoma
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(40) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OklahomaEDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(1) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(9) counit(40 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(10) counit(40 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(13) counit(40 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(17) counit(40 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(18) counit(40 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(19) counit(40 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(20) counit(40 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(21) counit(40 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(24) counit(40 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(27) counit(40 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(28) counit(40 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(33) counit(40 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(34) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(35) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(36) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(37) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(38) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(42) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(44) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(45) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(47) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(48) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(50) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(51) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(54) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11), trperiod(13) trunit(55) counit(40 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*South Dakota
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(46) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export SouthDakotaEDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(46 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(46 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(46 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(46 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(46 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(46 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(46 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(46 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(46 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(46 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(46 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(46 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


save enactdv6.dta


*************************************************************************************************************************************************
*Date of Implementation as Treatment Date
*************************************************************************************************************************************************

clear
use TermLimitsRun.dta

*Arizona
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(4) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ArizonaIDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local a=1
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local b=1
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(4 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(4 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(4 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(4 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(4 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(4 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(4 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(4 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(4 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(4 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(4 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(4 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(4 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Arkansas
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(5) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ArkansasIDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(1) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(9) counit(5 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(10) counit(5 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(13) counit(5 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(17) counit(5 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(18) counit(5 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(19) counit(5 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(20) counit(5 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(21) counit(5 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(24) counit(5 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(27) counit(5 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(28) counit(5 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(33) counit(5 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(34) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(35) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(36) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(37) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(38) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(42) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(44) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(45) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(47) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(48) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(50) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(51) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(54) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19),  trperiod(21) trunit(55) counit(5 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*California
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(6) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export CaliforniaIDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(1) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(9) counit(6 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(10) counit(6 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(13) counit(6 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(17) counit(6 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(18) counit(6 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(19) counit(6 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(20) counit(6 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(21) counit(6 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(24) counit(6 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(27) counit(6 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(28) counit(6 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(33) counit(6 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(34) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(35) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(36) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(37) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(38) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(42) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(44) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(45) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(47) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(48) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(50) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(51) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(54) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(55) counit(6 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats







*Colorado
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(8) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export ColoradoIDV6.ps



matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(1) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(9) counit(8 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(10) counit(8 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(13) counit(8 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(17) counit(8 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(18) counit(8 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(19) counit(8 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(20) counit(8 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(21) counit(8 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(24) counit(8 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(27) counit(8 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(28) counit(8 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(33) counit(8 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(34) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(35) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(36) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(37) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(38) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(42) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(44) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(45) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(47) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(48) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(50) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(51) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(54) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(55) counit(8 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Florida
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(12) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export FloridaIDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(12 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(12 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(12 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(12 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(12 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(12 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(12 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(12 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(12 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(12 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(12 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(12 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(12 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Maine
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(23) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MaineIDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(1) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(9) counit(23 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(10) counit(23 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(13) counit(23 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(17) counit(23 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(18) counit(23 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(19) counit(23 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(20) counit(23 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(21) counit(23 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(24) counit(23 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(27) counit(23 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(28) counit(23 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(33) counit(23 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(34) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(35) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(36) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(37) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(38) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(42) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(44) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(45) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(47) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(48) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(50) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(51) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(54) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16), trperiod(18) trunit(55) counit(23 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Michigan
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(26) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MichiganIDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(1) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(9) counit(26 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(10) counit(26 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(13) counit(26 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(17) counit(26 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(18) counit(26 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(19) counit(26 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(20) counit(26 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(21) counit(26 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(24) counit(26 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(27) counit(26 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(28) counit(26 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(33) counit(26 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(34) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(35) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(36) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(37) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(38) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(42) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(44) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(45) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(47) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(48) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(50) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(51) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(54) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18),  trperiod(20) trunit(55) counit(26 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Montana
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(30) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export MontanaIDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(30 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(30 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(30 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(30 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(30 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(30 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(30 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(30 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(30 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(30 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(30 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(30 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(30 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Ohio
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(39) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OhioIDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(39 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(39 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(39 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(39 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(39 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(39 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(39 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(39 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(39 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(39 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(39 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(39 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(39 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*South Dakota
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(46) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export SouthDakotaIDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(1) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(9) counit(46 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(10) counit(46 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(13) counit(46 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(17) counit(46 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(18) counit(46 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(19) counit(46 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(20) counit(46 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(21) counit(46 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(24) counit(46 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(27) counit(46 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(28) counit(46 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(33) counit(46 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(34) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(35) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(36) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(37) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(38) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(42) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(44) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(45) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(47) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(48) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(50) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(51) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(54) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15) Welfare_Exp_Per_Capita(16) Welfare_Exp_Per_Capita(17) Welfare_Exp_Per_Capita(18) Welfare_Exp_Per_Capita(19) Welfare_Exp_Per_Capita(20), trperiod(22) trunit(55) counit(46 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



save implemdv6.dta


*************************************************************************************************************************************************
*Repeal States
*************************************************************************************************************************************************

clear
use TermLimitsRun.dta

*Idaho
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(16) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export IdahoRDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local a=1
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local b=1
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(1) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(9) counit(16 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(10) counit(16 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(13) counit(16 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(17) counit(16 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(18) counit(16 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(19) counit(16 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(20) counit(16 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(21) counit(16 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(24) counit(16 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(27) counit(16 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(28) counit(16 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(33) counit(16 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(34) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(35) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(36) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(37) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(38) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(42) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(44) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(45) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(47) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(48) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(50) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(51) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(54) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(55) counit(16 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Massachusetts
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(25) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export MassachusettsRDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(1) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(9) counit(25 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(10) counit(25 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(13) counit(25 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(17) counit(25 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(18) counit(25 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(19) counit(25 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(20) counit(25 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(21) counit(25 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(24) counit(25 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(27) counit(25 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(28) counit(25 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(33) counit(25 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(34) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(35) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(36) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(37) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(38) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(42) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(44) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(45) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(47) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(48) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(50) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(51) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(54) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(55) counit(25 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Oregon
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(41) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export OregonRDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(41 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(41 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(41 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(41 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(41 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(41 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(41 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(41 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(41 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(41 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(41 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(41 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(41 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats





*Utah
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(49) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure   
graph export UtahRDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(1) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(9) counit(49 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(10) counit(49 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(13) counit(49 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(17) counit(49 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(18) counit(49 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(19) counit(49 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(20) counit(49 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(21) counit(49 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(24) counit(49 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(27) counit(49 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(28) counit(49 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(33) counit(49 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(34) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(35) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(36) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(37) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(38) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(42) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(44) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(45) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(47) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(48) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(50) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(51) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(54) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13) Welfare_Exp_Per_Capita(14) Welfare_Exp_Per_Capita(15),  trperiod(17) trunit(55) counit(49 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Washington
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(53) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export WashingtonRDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(53 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(53 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(53 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(53 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(53 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(53 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(53 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(53 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(53 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(53 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(53 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(53 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(53 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats






*Wyoming
qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(56) counit(1 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55) figure  
graph export WyomingRDV6.ps


matrix A = e(W_weights)
matselrc A B, c(2)
local ++a
svmat B, name(var`a')
matrix drop A
matrix drop B

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(1) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(9) counit(56 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(10) counit(56 9 1 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  


mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(13) counit(56 9 10 1 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(17) counit(56 9 10 13 1 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats



qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(18) counit(56 9 10 13 17 1 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(19) counit(56 9 10 13 17 18 1 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(20) counit(56 9 10 13 17 18 19 1 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(21) counit(56 9 10 13 17 18 19 20 1 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(24) counit(56 9 10 13 17 18 19 20 21 1 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(27) counit(56 9 10 13 17 18 19 20 21 24 1 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(28) counit(56 9 10 13 17 18 19 20 21 24 27 1 33 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(33) counit(56 9 10 13 17 18 19 20 21 24 27 28 1 34 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(34) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 1 35 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(35) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 1 36 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(36) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 1 37 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(37) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 1 38 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(38) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 1 42 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(42) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 1 44 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(44) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 1 45 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(45) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 1 47 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(47) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 1 48 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(48) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 1 50 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(50) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 1 51 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(51) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 1 54 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(54) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 1 55)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats


qui synth Welfare_Exp_Per_Capita population popgrowth populationdensity grants_real_pc gsp_real_inc fedempciv_pc fedempmil_pc govtempsandl_pc seats_house seats_senate unemployment gopshare demcontrol dividedgov squire_score initiatives tel debtlimit Welfare_Exp_Per_Capita(1) Welfare_Exp_Per_Capita(2) Welfare_Exp_Per_Capita(3) Welfare_Exp_Per_Capita(4) Welfare_Exp_Per_Capita(5) Welfare_Exp_Per_Capita(6) Welfare_Exp_Per_Capita(7) Welfare_Exp_Per_Capita(8) Welfare_Exp_Per_Capita(9) Welfare_Exp_Per_Capita(10) Welfare_Exp_Per_Capita(11) Welfare_Exp_Per_Capita(12) Welfare_Exp_Per_Capita(13), trperiod(15) trunit(55) counit(56 9 10 13 17 18 19 20 21 24 27 28 33 34 35 36 37 38 42 44 45 47 48 50 51 54 1)  

mat synthA = e(Y_synthetic)
mat treatA = e(Y_treated)
svmat  synthA
svmat treatA
forvalues i = 12(1)12 {
gen s1 = (synthA-treatA)^2
egen s2 = total(s1) if Year<`i'
egen s3 = total(s1) if Year>=`i'
gen s4 = sqrt(s2/(`i'-1))
gen s5 = sqrt(s3/(30-`i'))
egen s6 = mean(s4)
egen s7 = mean(s5)
gen s8 = s7/s6
gen s9 = treatA-synthA if Year>=`i'
egen s10 = mean(s9)
drop s1-s5
qui sum s6
scalar pre = r(mean)
qui sum s7
scalar post = r(mean)
qui sum s8
scalar ratio = r(mean)
qui sum s10
scalar diff = r(mean)
drop synthA 
drop treatA
drop s6-s8
drop s9-s10
matrix  stats = (pre, post, ratio, diff)
matrix list stats
     }

local ++b
svmat stats, name(stats`b')
matrix drop stats

save repealdv6.dta




















